package forum.client;

import forum.client.ui.ForumTree;
import javax.swing.*;

public class Client {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
        //JPanel frame = new JPanel();
        //frame.setSize(new Dimension(640, 480));
        //frame.add(tree.getForumTreeUI());
        //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
        //frame.setVisible(true);
        ForumTree tree = null;
        try {
            tree = new ForumTree();
        } catch (NullPointerException ex) {
            JOptionPane.showMessageDialog(new JFrame(),
			    "Server is down. Try again later.",
			    "Operation faile.",
			    JOptionPane.WARNING_MESSAGE);
            System.exit(1);
        }
        MainView mainViewFrame = new MainView(tree);
        mainViewFrame.getForumView().setViewportView(tree.getForumTreeUI());
        mainViewFrame.setVisible(true);
	}
}

